package com.jdb.social.api;

import java.util.Objects;

public enum UserAssociationState {
    NORMAL((byte) 1, "正常"),
    MISS((byte) 2, "失效"),;

    private byte value;
    private String name;

    UserAssociationState(byte value, String name) {
        this.value = value;
        this.name = name;
    }

    public byte getValue() {
        return value;
    }

    public static boolean isNormal(Byte type) {
        return Objects.nonNull(type) && NORMAL.getValue() == type;
    }

    public static boolean isMiss(Byte type) {
        return Objects.nonNull(type) && MISS.getValue() == type;
    }
}